package com.parking.order.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

/**
 * 添加出场信息Form
 * */
@Data
public class AddOutInfoForm {
    /**
     * 车位信息Id
     * */
    @ApiModelProperty("车位号")
    @Pattern(message = "stallInfo不符合格式", regexp = "^[A-Z]{1}[0-9]{3}$")
    @NotNull(message = "stallInfo不为空")
    private String stallInfo;
    /**
     * 车牌号
     * */
    @ApiModelProperty("车牌号")
    @NotBlank(message = "carPlate不能为空")
    @Pattern(message = "carPlate不符合格式", regexp = "^[京津沪冀晋辽吉黑苏浙皖闽赣鲁豫鄂湘粤桂琼川黔云渝藏陕陇青宁新闽粤晋琼使领A_Z]{1}[A_Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$")
    private String carPlate;
    /**
     * 出场时间
     * */
    @ApiModelProperty("出场时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "entranceOutTime不为空")
    private LocalDateTime entranceOutTime;
}
